﻿@using System.Activities.Expressions
@using QDT.Core
@using QDT.Core.Projects
@using QDT.MVC
@using QDT.MVC.UI
@model QDT.Common.IPagedList<QDT.Core.Projects.Project>
@{
    ViewBag.Title = "禧农贷列表";
}
@section Head
{
    <link href="/Content/Default/CSS/project_list.css" rel="stylesheet" type="text/css" /> 
    <!--[if !(IE 8)]><!--> 
    <style type="text/css">
        .extrabonus
        {
          position: absolute;top: -1px;right: -1px;
        }
    </style>
    <!--<![endif]-->
    <!--[if IE 8]>
    <style type="text/css">
        .extrabonus
        {
            width: 60px;
            height: 0;
            position: absolute;
            right: 0px;
            top: 21.5px;
            z-index: 10;
            text-align: center;
            border-bottom: 20px solid #1ac332;
        }
    </style>
    <![endif]-->
}
<div class="">
    <div>
        @Html.Partial("_ListNav")
        <div class="wrap filter-wrap" style="border-bottom: 1px solid #E5E5E5;">
            <div class="container filter-container" style="width: 980px; margin: 0 auto; position: relative;">
                <div style="width: 645px; border-right: 1px solid #E5E5E5;">
                    <div class="filter-condition">
                        <label style="font-size: 14px;">
                            标的类型</label>
                        <ul class="filter-content" id="safeclass">
                            <li class="filter-item @(ViewBag.safeclass == 0 ? "active" : "")" value="0">不限</li>
                            <li class="filter-item @(ViewBag.safeclass == 3 ? "active" : "")" value="3">
                                担保标</li>
                            <li class="filter-item @(ViewBag.safeclass == 2 ? "active" : "")" value="2">
                                抵押标</li>
                        </ul>
                    </div>
                    <div class="filter-condition">
                        <label style="font-size: 14px;">
                            借款期限</label>
                        <ul class="filter-content" id="deadline">
                            <li class="filter-item @(ViewBag.deadline == 0 ? "active" : "")" value="0">不限</li>
                            <li class="filter-item @(ViewBag.deadline == 1 ? "active" : "")" value="1">1-3月标</li>
                            <li class="filter-item @(ViewBag.deadline == 4 ? "active" : "")" value="4">4-5月标</li>
                            <li class="filter-item @(ViewBag.deadline == 6 ? "active" : "")" value="6">6-12月标</li>
                        </ul>
                    </div>
                    <div class="filter-condition">
                        <label style="font-size: 14px;">
                            还款状态</label>
                        <ul class="filter-content" id="status">
                            <li class="filter-item @(ViewBag.status == 0 ? "active" : "")" value="0">不限</li>
                            <li class="filter-item @(ViewBag.status == 4 ? "active" : "")" value="4">还款中</li>
                            <li class="filter-item @(ViewBag.status == 5 ? "active" : "")" value="5">还款完成</li>
                        </ul>
                    </div>
                </div>
                <div class="filter-condition" style="width: 200px; position: absolute; top: 15px;right: 180px;">
                </div>
            </div>
        </div>
    </div>
    <div style="background: #f8f8f8" ondragstart="return false;">
        <div class="ui-inner">
            <div style="width: 1002px; height: auto;" class=" fn-clear">
               @Html.Action("Projects","Widget", new{proPagedList=Model})
            </div>
            <div style="width: 980px;padding: 25px 0;">
                @Html.ClientPager(Model)
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $().ready(function () {
        $("#projectlist a").siblings().removeClass('a_class').end().addClass('a_class');
        $("#projectlist div").siblings("div").css("display", "none").end().css("display", "block");
    });

    $('.filter-item').click(function () {
        $(this).siblings().removeClass('active').end().addClass('active');
        
        $.ajaxSetup({
            async: false
        });
        var safeclass = $("#safeclass li").filter(".active").val();
        var deadline = $("#deadline li").filter(".active").val();
        var status = $("#status li").filter(".active").val();
        var url = "/Home/ProjectList?" + "safeclass=" + safeclass + "&deadline=" + deadline + "&status=" + status;
        window.location.href = url;
      
    });
</script>
